package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TOrderQrcodeInfoMapper;
import com.ruoyi.business.domain.TOrderQrcodeInfo;
import com.ruoyi.business.service.ITOrderQrcodeInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单二维码信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-06
 */
@Service
public class TOrderQrcodeInfoServiceImpl implements ITOrderQrcodeInfoService 
{
    @Autowired
    private TOrderQrcodeInfoMapper tOrderQrcodeInfoMapper;

    /**
     * 查询订单二维码信息
     * 
     * @param id 订单二维码信息主键
     * @return 订单二维码信息
     */
    @Override
    public TOrderQrcodeInfo selectTOrderQrcodeInfoById(Long id)
    {
        return tOrderQrcodeInfoMapper.selectTOrderQrcodeInfoById(id);
    }

    /**
     * 查询订单二维码信息列表
     * 
     * @param tOrderQrcodeInfo 订单二维码信息
     * @return 订单二维码信息
     */
    @Override
    public List<TOrderQrcodeInfo> selectTOrderQrcodeInfoList(TOrderQrcodeInfo tOrderQrcodeInfo)
    {
        return tOrderQrcodeInfoMapper.selectTOrderQrcodeInfoList(tOrderQrcodeInfo);
    }

    /**
     * 新增订单二维码信息
     * 
     * @param tOrderQrcodeInfo 订单二维码信息
     * @return 结果
     */
    @Override
    public int insertTOrderQrcodeInfo(TOrderQrcodeInfo tOrderQrcodeInfo)
    {
        tOrderQrcodeInfo.setCreateTime(DateUtils.getNowDate());
        return tOrderQrcodeInfoMapper.insertTOrderQrcodeInfo(tOrderQrcodeInfo);
    }

    /**
     * 修改订单二维码信息
     * 
     * @param tOrderQrcodeInfo 订单二维码信息
     * @return 结果
     */
    @Override
    public int updateTOrderQrcodeInfo(TOrderQrcodeInfo tOrderQrcodeInfo)
    {
        tOrderQrcodeInfo.setUpdateTime(DateUtils.getNowDate());
        return tOrderQrcodeInfoMapper.updateTOrderQrcodeInfo(tOrderQrcodeInfo);
    }

    /**
     * 批量删除订单二维码信息
     * 
     * @param ids 需要删除的订单二维码信息主键
     * @return 结果
     */
    @Override
    public int deleteTOrderQrcodeInfoByIds(String ids)
    {
        return tOrderQrcodeInfoMapper.deleteTOrderQrcodeInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单二维码信息信息
     * 
     * @param id 订单二维码信息主键
     * @return 结果
     */
    @Override
    public int deleteTOrderQrcodeInfoById(Long id)
    {
        return tOrderQrcodeInfoMapper.deleteTOrderQrcodeInfoById(id);
    }

    @Override
    public int deleteAllTOrderQrcodeInfo() {
        return tOrderQrcodeInfoMapper.deleteAllTOrderQrcodeInfo();
    }
}
